import React, { useState,useEffect } from 'react'
import { View, Text } from '@tarojs/components'
import { AtSearchBar } from 'taro-ui'
// import taro from '@tarojs/taro'
import BusinessContent from '../../compontents/businessContent'
import ToLogin from '../../compontents/toLogin'

import "taro-ui/dist/style/components/search-bar.scss";
import "taro-ui/dist/style/components/button.scss";
import "taro-ui/dist/style/components/icon.scss";


import './index.less'

export default (props: any) => {
  const [title,setTitle]=useState('')
  let t1 = ''
  const onChange = (e)=>{
    // setTitle(e) 
    t1 = e
  }
  const onActionClick = ()=>{
    setTitle(t1)
  }
  
  return (
    <View className='active'>
      {/* <ToLogin url='/pages/active/index'></ToLogin> */}
      <AtSearchBar
        className='search'
        value={''}
        onChange={onChange}
        onActionClick={onActionClick}
      />
      <BusinessContent title={title}/>
    </View>
  );
};
